package com.rong.maven01demo.handler;

import com.rong.maven01demo.control.UserController;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class LoginIntercaptor implements HandlerInterceptor {

    @Autowired
    private Logger log = LoggerFactory.getLogger(LoginIntercaptor.class);
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        System.out.println("LoginIntercaptor");
        log.info("LoginIntercaptor");
        return true;
    }
}
